<?php

/*
 * $Id: standart.php 14 2011-01-23 07:35:00Z LEON $
 * $Author: LEON $
 * $LastChangedDate: 2011-01-23 07:35:00 +0000 (Sun, 23 Jan 2011) $
 * $Revision: 14 $
 */

namespace cmFly\controller\module;

use cmFly\controller;

class standart extends controller\base {

    private $module_root;
    private $route;
    private $args;
    private $last_error;

    public function __construct($module_root, controller\base $parent, $route, $args=NULL, $last_error=NULL) {
	parent::__construct($module_root, $parent);
	$this->module_root = $module_root;
	$this->route = $route;
	$this->args = $args;
	$this->last_error = $last_error;
    }

    public function get_last_error() {
	return $this->last_error;
    }

    public function get_module_root() {
	return $this->module_root;
    }

    public function get_route() {
	return $this->route;
    }

    public function exec() {
	$module = $this;
	$this->run(function () use ($module) {

		});
    }

    public function get_database($to=NULL) {
	return $this->get_parent()->get_database($to);
    }

}